package com.mdh.runerrands.Util;

import com.alipay.api.DefaultAlipayClient;

public class AlipayClient {
    /**
     * 服务网关 沙箱环境都是这个
     */
    public static String serverUrl = "https://openapi.alipaydev.com/gateway.do";
    /**
     * 应用id 后期可以替换成自己的id */
    public static String appId = "2021000117617500";
    /**
     * 应用私钥 每个人的不一样  注意在生成应用公钥的时候去获取
     */
    public static String privateKey="MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCjSC9Xk96jrjfYv4WoHU8xSvTaOstOd1t2ZRrMXXm23x93W8/iYAf9zbqng31Dsl1hWa7zbeVicB/evSnKxAM92RGipYYlzY4IoExlhN+fhx85CV7YY7+XHO91vKdNwip7vkLWKfv0igmt5caqoi++WyvXuwHt7g3SzlynsnxEIP10qnFMtYFv6rkFqZq0opDakwbNbvRWLsknFyrMldBHPVteep5udqe5jY/eHLhwHwvIl65kpApancGe7gQBq6LNTxGhhcoYbv60q2mq4EemK5Mtl57fWpq4RiLdRubwOBw3Ef8AzELw/1Y8y3i6rbju9sev5TE4GCfbT5SkQpQlAgMBAAECggEAA2+KZ3paDfGlhS8Kfe4X836TRmBEVONYDla0SKaS4BEz1UweRLImmOWSTuIKablAE8NSVhby465eTU6HqZeUReHiaBy5hOQdX/sXgG9aUT4DnyyeTUlUB7b5Ju4QSyeRw0bOmzkI7y1UZM9X7dE51fSPKJvrv3jp24yyEGlGChzqxkaHcniUqWUjuH+wKZ8VF5FvQyJkecjpzi74MhDir3z5geLCX52h2N+VBmcS4Lw8+bKuex22+VfkWDcuoY7W5rSe/VA80qgYjvDBOIEz5rTGNOZGQqJ4HblDXM/Uu2SelFL6I0MIhnO68ABLT1da1PUVeq0Afit7z/xlPe6yJQKBgQD/xJonW0W9HF2GmoDEAUwpIrIj8V+GUaVJUxKZF86OQ367AGrX33pn/YhAVMEySXfrDjSnL+f6DjGw8mxOLCLj4sxzSihlPsJw9HU6dA1uu06cGXKZ2/l0eVs4YFeDIPXfe7yhmtKgpmYR2nDTBgSFTTKT8VmMI78RJbO+z21ITwKBgQCjbhq8e+uQuPLoOqGRlZbgQ8EsRKQD+71elJH1NB0SDLfxtFXma1dQKafEH1Z1qhDPzNQ8hdLhgYph9wlxYWuzThpYLku7kIvXQhpO6SWRdlciNUkBIbB29tF3j9WrnINnEY221VQUvgU9AiYNjBFQiLhs93K8z0srOn1ZBO0LSwKBgCiVapx6GBvEx3ZXR71SM2KHldqsLysiA2caHmZaZ7UdMpu7mjh8xnB/w0Hp8OnozHVowKQSru13mRzpqpPQ3wxn7WcRyk0eYz4HHB7VUVhTskqEozGUvQVlSDsu1lQBQ+JdQPYnmepR3PpSPfrOBqOcNz1QW5QoC+ZNpDLPuRhzAoGAUv7dcQ71iF+EbE8qMgbnwihmd5a8PJGhj+CfZwj6Imp3F7ZfUU793mXpHv5TKBofw4ff2ISVnZPttOaB0ySIT1zAoDuSlkRH4B9fwOdB/uc8RNEOrBZxyVh6898FwcsQKE2PzGP1+Tqu6lanAIY7XMyx7BSWHjCfmepwMb8AqpUCgYB+JzLU4BRV8gRbXSgvqVDGkUo10ajbXKJj/7D7v2xdx0dWzSqUaoBradbRHrvm1pv+EdqwPQ58k1Tl/8/Np6+keUzK55VR2e/OCQRcj9arXw/zeUg/751Kgcj0t2kxcbBgP2zi42p3B+UD+CXBkowVCaSRCngixQ1BYDMJJpn1kw==";


    /**
     * 发送数据的格式 目前只能为json
     *
     */
    public static String format = "json";
    /**
     * 字符编码集
     */
    public static String charset = "utf-8";

    /**
     * 支付宝公钥 后期替换成自己的支付宝公钥 */
    public static String publicKey ="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmE/jsaMbgybtf5Ejzod0vi+Czr47Rq+LNGwjn8pIB8X3fdpawshJj6fgo/NiSU+memsZ5vErfaFbDHC9L2hq7yofoHaTXEWiZe/viQCYE4NL76269PdZ2Et/AigpegHMpeAki/zbEoLcZaGbDpaBbmWcrPt6QCaBoHv7zwABypJjvuQiP9Koo5x9oE4M+5j3tiiLpc5t3mxq3Soipc0HazG49y4OqhgXpCYv0uhcrryRH9UB8GxSyScBP5WKUk7ARft4w57kHS6b0e26U/TTcCrPtFMSlBsPRf0xAIrmT/HyJ43wZWiniP1eEJRcsCCTdHQYp+J8oKyLDY3c2yL08wIDAQAB";
    /**
     * 支付宝签名 目前是 RSA2 */
    public static String signType = "RSA2";



    public static com.alipay.api.AlipayClient getAlipayClient() { // 获得初始化的AlipayClient
        com.alipay.api.AlipayClient alipayClient = new
                DefaultAlipayClient(serverUrl, appId, privateKey, format, charset, publicKey, signType);
        return alipayClient;
    }
}
